// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * SalesruleLabel generated by hbm2java
 */
@Entity
@Table(name = "salesrule_label", catalog = "magento", uniqueConstraints = @UniqueConstraint(columnNames = {
		"rule_id", "store_id" }))
public class SalesruleLabel implements java.io.Serializable {

	private Integer labelId;
	private Salesrule salesrule;
	private CoreStore coreStore;
	private String label;

	public SalesruleLabel() {
	}

	public SalesruleLabel(Salesrule salesrule, CoreStore coreStore) {
		this.salesrule = salesrule;
		this.coreStore = coreStore;
	}

	public SalesruleLabel(Salesrule salesrule, CoreStore coreStore, String label) {
		this.salesrule = salesrule;
		this.coreStore = coreStore;
		this.label = label;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "label_id", unique = true, nullable = false)
	public Integer getLabelId() {
		return this.labelId;
	}

	public void setLabelId(Integer labelId) {
		this.labelId = labelId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "rule_id", nullable = false)
	public Salesrule getSalesrule() {
		return this.salesrule;
	}

	public void setSalesrule(Salesrule salesrule) {
		this.salesrule = salesrule;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id", nullable = false)
	public CoreStore getCoreStore() {
		return this.coreStore;
	}

	public void setCoreStore(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	@Column(name = "label")
	public String getLabel() {
		return this.label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

}
